package l2hc.gameserver.data.xml.holder;

import java.util.HashMap;
import java.util.Map;

import l2hc.commons.data.xml.AbstractHolder;
import l2hc.gameserver.model.superPoint.SuperPoint;

public final class SuperPointHolder extends AbstractHolder
{
  private static SuperPointHolder _instance;
  @SuppressWarnings({ "unchecked", "rawtypes" })
  private Map<String, SuperPoint> _superPointMap = new HashMap();

  public static SuperPointHolder getInstance()
  {
    if (_instance == null)
    {
      _instance = new SuperPointHolder();
    }
    return _instance;
  }

  public void addSuperPoints(String pointName, SuperPoint superPoints)
  {
    _superPointMap.put(pointName, superPoints);
  }

  public SuperPoint getSuperPointsByName(String pointName)
  {
    return _superPointMap.get(pointName);
  }

  public int size()
  {
    return _superPointMap.size();
  }

  public void clear()
  {
    _superPointMap.clear();
  }
}
